package main;

public class Symbol {
	public static final int I_NULL = 0;
	public static final int I_WHILE = 1;
	public static final int I_DO = 2;
	public static final int I_IF = 3;
	public static final int I_ELSE = 4;
	public static final int I_INPUT = 5;
	public static final int I_OUTPUT = 6;
	public static final int I_EQUALS_IDENTIFIER = 7;
	public static final int I_EOL_IDENTIFIER = 8;
	public static final int I_CONDITIONAL_START_IDENTIFIER = 9;
	public static final int I_CONDITIONAL_END_IDENTIFIER = 10;
	public static final int I_BLOCK_START_IDENTIFIER = 11;
	public static final int I_BLOCK_END_IDENTIFIER = 12;
	public static final int I_GTSYMBOL = 13;
	public static final int I_LTSYMBOL = 14;
	public static final int I_GTESYMBOL = 15;
	public static final int I_LTESYMBOL = 16;
	public static final int I_EQUIVSYMBOL = 17;
	public static final int I_PLUS = 18;
	public static final int I_MINUS = 19;
	public static final int I_MULTIPLY = 20;
	public static final int I_DIVIDE = 21;
	public static final int I_NOTEQL = 22;
	public static final int I_NUMBER = 23;
	public static final int I_IDENT = 24;
	public static final int I_NEGATIVE = 25;
	
	public int symtype;
    public String id;
    public boolean overflow;
    public int num;

    /**
     * Construct with symbol type.
     * @param stype type of symbol
     */
    Symbol(int stype) {
        symtype = stype;
    }

    /**
     * Identifier with string to put in symbol table as its name.
     * @param stype The type of symbol.
     * @param s The name of the identifier.
     */
    Symbol(int stype, String s) {
        symtype = stype;
        id = s;
    }

    /**
     * Symbol with overflow.
     * @param stype
     * @param oflow
     * @param n
     */
    Symbol(int stype, boolean oflow, int n) {
        symtype = stype;
        overflow = oflow;
        num = n;
    }
}
